package com.gma.userprofile.info.platform

import com.gma.userprofile.util.{HBaseUtil, SparkUtil}

object UserProfileRegTime {
  def main(args: Array[String]): Unit = {

    //获取分区参数
    val ds = args.head

    //获取spark环境
    val spark = SparkUtil.getSparkSession

    //提取标签
    val regTimeTag = spark.sql(
      s"""
        |select
        |id,
        |create_time as regTime
        |from
        |dim.dim_pub_user_info_d_f
        |where ds='$ds'
        |
        |""".stripMargin)

    //保存到hbase
    HBaseUtil.tagToHBase(regTimeTag, "regTime")

  }

}
